# 只采用加法实现 减法
class Solution:
    def minus(self, x, y):
        a = max(x,y)
        b = min(x,y)
        res = 0
        while b<a:
            b = b+1
            res += 1
        return res
    def multi(self,x,y):
        if x == 0 or y == 0:
            return 0
        flag = 1 if (x<0 and y<0) or (x>0 and y>0) else -1
        x,y = abs(x),abs(y)
        res = 0
        for i in range(x):
            res += y
        return res

    def dev(selfself,x,y):
        if y == 0:
            return -1
        if x == 0 :
            return 0
        flag = 1 if (x < 0 and y < 0) or (x > 0 and y > 0) else -1
        x, y = abs(x), abs(y)
        s = 0
        res = 0
        while s<x:
            s += y
            res += 1
        return res

S = Solution()
x,y = 10,2
print(S.minus(x,y), S.multi(x,y), S.dev(x,y))




